home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 1
/
SPACE - Library 1 - Volume 1.iso
/
program
/
385
/
prg_1
/
prg_1bp.s
< prev
next >
Wrap
Text File
|
1985-11-19
|
1KB
|
29 lines
; Program Name: PRG_1BP.S
; Assembly Instructions:
; Assemble in AssemPro PC-relative mode and save the assembled program
; with a PRG extension, then save it with a TOS extension.
; Program Function:
; This program waits until a key is pressed on the keyboard. When
; that event occurs, it returns control to the operating system.
; NOTE: This program cannot be executed repeatedly in the debugger unless
; the S bit of the status register is reset after each execution.
; If the S bit is not reset as stated, the system will freeze, and
; must be reset with the computer's reset switch.
wait_for_keypress:
move.w #8, -(sp) ; Function = c_necin = GEMDOS $8.
trap #1 ; GEMDOS call.
addq.l #2, sp ; Reposition stack pointer at top of stack.
terminate: ; My descriptive label.
move.w #0, -(sp) ; Function = p_term_old = GEMDOS $0.
trap #1 ; GEMDOS call.
end ; Assembler pseudo-op.